<!DOCTYPE html>
<!--suppress ALL -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>书籍测试跨域</title>
    <link href="../../static/bootstrap/css/bootstrap.min.css" rel="stylesheet" style="text:css"/>
    <script type="application/javascript" src="../../static/js/jquery/jquery-1.7.2.js"></script>
    <script type="application/javascript">
        function crosRequest(){
            $.ajax({
                url:'http://localhost:8080/book/queryAllBook',
                type:'get',
                dataType:'json',
                success:function(data){
                    console.log(data);
                }
            });
        }
    </script>
</head>

<body>

    <button type="button" class="btn btn-link" onclick="crosRequest();">请求跨域资源</button>

</body>
</html>
